package org.example.baomidou.controller;

import org.example.baomidou.service.GoodsService;
import org.example.baomidou.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private OrderService orderService;
    @Autowired
    private GoodsService goodsService;


    @GetMapping("/save")
    public String save(){
        orderService.saveOrder();
        goodsService.saveGoods();
        return "success";
    }

}
